require "ripper"
require "pp"

code = <<STR
10.times do |n|
	puts n
end
STR

puts code 
pp Ripper.lex code

=begin
OUTPUT

10.times do |n|
	puts n
end
[[[1, 0], :on_int, "10"],
 [[1, 2], :on_period, "."],
 [[1, 3], :on_ident, "times"],
 [[1, 8], :on_sp, " "],
 [[1, 9], :on_kw, "do"],
 [[1, 11], :on_sp, " "],
 [[1, 12], :on_op, "|"],
 [[1, 13], :on_ident, "n"],
 [[1, 14], :on_op, "|"],
 [[1, 15], :on_ignored_nl, "\n"],
 [[2, 0], :on_sp, "\t"],
 [[2, 1], :on_ident, "puts"],
 [[2, 5], :on_sp, " "],
 [[2, 6], :on_ident, "n"],
 [[2, 7], :on_nl, "\n"],
 [[3, 0], :on_kw, "end"],
 [[3, 3], :on_nl, "\n"]]


=end